#!/bin/bash

echo "---start 2c-audio plug-in setup main pre-update script---"
echo ""

# Reset file permissions

sudo chmod -R a+rw "/Library/Application Support/2C-Audio"

# backup the demo file

demo_file_path="/Library/Application Support/2C-Audio/Breeze2-Demo/demo.prop"
demo_file_tmp_path="$INSTALLER_TEMP/demo.prop"

echo $demo_file_path
echo ""
echo $demo_file_tmp_path
echo ""

cp "$demo_file_path" "$auth_file_tmp_path"

# remove demo version

rm -r "/Library/Application Support/2C-Audio/Breeze2-Demo"

echo ""
echo "---end 2c-audio plug-in setup main pre-update script---"

exit 0